from ultralytics import YOLO

model = YOLO(r"F:\yolov8test\ultralytics\runs\detect\train130\weights\best.pt")
model.export(format="onnx")